<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>终身学习</title>
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css">


    <link rel="stylesheet" href="https://cdn.jsdelivr.net.cn/npm/swiper@11/swiper-bundle.min.css">
    <script src="https://cdn.jsdelivr.net.cn/npm/swiper@11/swiper-bundle.min.js"></script>

    <style>
        body {
            font-family: "Microsoft YaHei", sans-serif;
            background-color: #f7e1de;
            color: #333;
            max-width: 768px;
            margin: 0 auto;
        }

        .header {
            background-color: #f6f7fb;
            color: white;
            padding: .2rem .2rem 0;
            position: relative;
            display: block;
            float: left;
            width: 100%;
            height: auto;
            box-sizing: border-box;
        }

        .animate-section {
            opacity: 0;
            transform: translateY(20px);
            transition: opacity 0.5s ease-out, transform 0.5s ease-out;
        }

        .animate-section.active {
            opacity: 1;
            transform: translateY(0);
        }

        .nav-icon {
            text-align: center;
            margin-bottom: .1rem;
        }

        .nav-icon img {
            width: 80px;
            height: 80px;
            margin-bottom: 5px;
        }

        .swiper {
            width: 100%;
            height: auto;
            display: block;
            float: left;
        }

        .swiper img {
            width: 100%;
            height: auto;
            display: block;
            float: left;
            border-radius: .2rem;
        }

        .container {

            padding: 0;
            max-width: 750px;
            opacity: 0;
            overflow-x: hidden;
        }

        .nav-box {
            width: 100%;
            height: auto;
            display: block;
            float: left;
            background: #fff;
            border-radius: .2rem;
            margin: .2rem 0 0;
            padding: 0 0 .2rem 0;
        }

        .nav-box div {
            width: 25%;
            height: auto;
            display: block;
            float: left;
        }

        .nav-box div a {
            width: 100%;
            height: auto;
            display: block;
            float: left;
        }

        .nav-box div img {
            width: 60%;
            height: auto;
            display: block;
            margin: .3rem 20% 0;
            float: left;
        }

        .nav-box div p {
            width: 100%;
            height: auto;
            display: block;
            margin: 0 0;
            text-align: center;
            font-size: .3rem;
            color: #1d1c1e;
            float: left;
            margin: .2rem 0 0rem;
        }

        .main {
            width: 100%;
            height: auto;
            display: block;
            float: left;
            position: relative;
            z-index: 2;
        }

        .ma_box {
            width: 100%;
            height: 5.54rem;
            display: block;
            float: left;
            background: url(./img/top.png) no-repeat;
            background-size: 100% 100%;
            margin-top: -.5rem;
            position: relative;
            z-index: 2;
        }

        .ma_box_top {
            width: 90%;
            height: auto;
            display: block;
            float: left;
            margin: .5rem 5% 0;
            text-align: center;
            font-family: PingFangSC, PingFang SC;
            font-weight: 600;
            font-size: .5rem;
            color: #000000;
            line-height: .7rem;
        }

        .ma_box_top i {
            width: .71rem;
            height: .31rem;
            display: inline-block;

            background-image: url(./img/l.png);
            background-size: 100% 100%;

        }

        .ma_box_top i:last-child {
            background-image: url(./img/r.png);
        }

        .ma {
            width: 2.93rem;
            height: auto;
            display: block;
            float: left;
            margin: .2rem 2.28rem 0;
        }

        .ma_t {
            width: 4.7rem;
            height: .84rem;
            display: block;
            float: left;
            margin: .2rem 1.4rem 0;
            text-align: center;
            font-family: PingFangSC, PingFang SC;
            font-weight: 500;
            font-size: .32rem;
            color: #650000;
            line-height: .45rem;
            text-align: center;
            box-sizing: border-box;
            padding: .25rem 0 0 0;
            background-image: url(./img/t.png);
            background-size: 100% 100%;
        }

        .box_t {
            width: 6.9rem;
            height: auto;
            font-family: PingFangSC, PingFang SC;
            font-weight: 500;
            font-size: .3rem;
            color: #333333;
            line-height: .5rem;
            text-align: left;
            font-style: normal;
            margin: .2rem .3rem;
        }

        .box_f1 {
            width: 6.86rem;
            height: 6.09rem;
            display: block;
            float: left;
            margin: 0 .32rem .4rem;
            background-image: url(./img/zy.png);
            background-size: 100% 100%;
        }

        .box_f1 span {
            width: 6.22rem;
            height: auto;
            font-family: PingFangSC, PingFang SC;
            font-weight: 400;
            font-size: .3rem;
            color: #333333;
            line-height: .5rem;
            text-align: justify;
            font-style: normal;
            display: block;
            float: left;
            margin: .89rem .24rem 0;
        }

        .box_f3 {
            width: 6.86rem;
            height: 5.89rem;
            display: block;
            float: left;
            margin: 0 .32rem .4rem;
            background-image: url(./img/js.png);
            background-size: 100% 100%;
        }

        .box_f3 span {
            width: 6.34rem;
            height: auto;
            font-family: PingFangSC, PingFang SC;
            font-weight: 400;
            font-size: .3rem;
            color: #333333;
            line-height: .5rem;
            text-align: justify;
            font-style: normal;
            display: block;
            float: left;
            margin: .89rem .26rem 0;
        }

        .box_f2 {
            width: 6.86rem;
            height: 4.82rem;
            display: block;
            float: left;
            margin: 0 .32rem .4rem;
            background-image: url(./img/cj.png);
            background-size: 100% 100%;
        }

        .box_f2 span {
            width: 6.34rem;
            height: auto;
            font-family: PingFangSC, PingFang SC;
            font-weight: 400;
            font-size: .3rem;
            color: #333333;
            line-height: .5rem;
            text-align: justify;
            font-style: normal;
            display: block;
            float: left;
            margin: .89rem .26rem 0;
        }

        .box_f2 span:last-child {
            width: 3.54rem;
            height: auto;
            font-family: PingFangSC, PingFang SC;
            font-weight: 400;
            font-size: .3rem;
            color: #333333;
            line-height: .5rem;
            text-align: justify;
            font-style: normal;
            display: block;
            float: left;
            margin: 0 .26rem 0;
        }

        .box_f4 {
            width: 6.86rem;
            height: 4.2rem;
            display: block;
            float: left;
            margin: 0 .32rem .4rem;
            background-image: url(./img/nl.png);
            background-size: 100% 100%;
        }

        .box_f4 span {
            width: 6.34rem;
            height: auto;
            font-family: PingFangSC, PingFang SC;
            font-weight: 400;
            font-size: .3rem;
            color: #333333;
            line-height: .5rem;
            text-align: justify;
            font-style: normal;
            display: block;
            float: left;
            margin: .89rem .26rem 0;
        }

        .box_f4 span:last-child {
            width: 3.32rem;
            height: auto;
            font-family: PingFangSC, PingFang SC;
            font-weight: 400;
            font-size: .3rem;
            color: #333333;
            line-height: .5rem;
            text-align: justify;
            font-style: normal;
            display: block;
            float: left;
            margin: 0 .26rem 0;
        }
    </style>
</head>

<body>
    <div class="container">



        <!--  轮播 导航 -->
        <div class="header ">
            <div class="swiper">
                <div class="swiper-wrapper">
                    <div class="swiper-slide">
                        <a href="https://h5.metareader.cn/h5/pages/main?tenantId=101402&appId=hhraoe15">
                            <img src="./img/banner.jpg" alt="终身阅读">
                        </a>
                    </div>
                    <div class="swiper-slide">
                        <a href="https://h5.metareader.cn/h5/pages/main?tenantId=101402&appId=hhraoe15">
                            <img src="./img/banner.jpg" alt="终身阅读">
                        </a>

                    </div>

                </div>
            </div>

            <div class="nav-box">

                <div class="nav-icon">
                    <a
                        href="https://h5.metareader.cn/h5/pages/sub/categoriesList?catId=202894237887588689&tenantId=101402&appId=hhraoe15">
                        <img src="./img/1.png" alt="文学">
                        <p>文学</p>
                    </a>
                </div>
                <div class="nav-icon">
                    <a
                        href="https://h5.metareader.cn/h5/pages/sub/categoriesList?catId=202894237887588690&tenantId=101402&appId=hhraoe15">
                        <img src="./img/2.png" alt="社科">
                        <p>社科</p>
                    </a>
                </div>
                <div class="nav-icon">
                    <a
                        href="https://h5.metareader.cn/h5/pages/sub/categoriesList?catId=202894237887588691&tenantId=101402&appId=hhraoe15">
                        <img src="./img/3.png" alt="科普">
                        <p>科普</p>
                    </a>
                </div>
                <div class="nav-icon">
                    <a
                        href="https://h5.metareader.cn/h5/pages/sub/categoriesList?catId=202894237887588692&tenantId=101402&appId=hhraoe15">
                        <img src="./img/4.png" alt="艺术生活">
                        <p>艺术生活</p>
                    </a>
                </div>


                <div class="nav-icon">
                    <a
                        href="https://h5.metareader.cn/h5/pages/sub/categoriesList?catId=202894237887588693&tenantId=101402&appId=hhraoe15">
                        <img src="./img/5.png" alt="少儿">
                        <p>少儿</p>
                    </a>
                </div>
                <div class="nav-icon">
                    <a
                        href="https://h5.metareader.cn/h5/pages/sub/list?columnId=209911342570948744&appId=hhraoe15&tenantId=101402">
                        <img src="./img/6.png" alt="听书">
                        <p>听书</p>
                    </a>
                </div>
                <div class="nav-icon">
                    <a
                        href="https://h5.metareader.cn/h5/pages/sub/webview?url=https%253A%252F%252Fmudu.tv%252F%253Fc%253Dportal%2526a%253Dindex%2526id%253Dvlk9rpm1&title=%E8%AE%B2%E5%BA%A7">
                        <img src="./img/7.png" alt="讲座">
                        <p>讲座</p>
                    </a>
                </div>

            </div>


        </div>

        <!-- 内容 -->
        <div class="main animate-section">
            <div class="ma_box">
                <div class="ma_box_top">
                    <i></i>
                    <span>首都图书馆终身学习</span>
                    <i></i>
                </div>
                <img src="./img/ma.png" class="ma" alt="终身阅读">
                <div class="ma_t"><span>长按二维码，浏览更多内容</span></div>
            </div>
            <div class="box_t">
                首都图书馆终身学习+是面向全年龄段市民的在线学习平台，致力于打造便捷、高效的全民学习环境。
            </div>
            <div class=" box_f1">
                <span>平台汇聚海量数字化资源，涵盖职业技能培训、兴趣爱好培养、老年教育等众多领域。包括文化慕课4000分钟、电子书10万册、电子期刊3000种、视频资源200000分钟、绘本资源1000套、听书资源129000分钟、才艺课程4000分钟及其他优质课程资源。</span>
            </div>
            <div class="animate-section box_f2">
                <span>平台通过80余个数据库，为婴幼儿、未成年人、老年人、康复人群、外来务工人群等提供</span>
                <span>阅读和自学服务。从阅读习惯上让全年龄人群从原本的“文献阅读”向“知识阅读”去转变。</span>
            </div>
            <div class="animate-section box_f3">
                <span>平台引入先进AI服务，如AI学伴“图阅悦”24小时解答学习疑问，AI算法依据学习习惯和偏好精准推送个性化学习内容。此外，平台还具备AI文献检索与获取、AI与书对话、VR沉浸书房和AI视频理解等功能。</span>
            </div>
            <div class="animate-section box_f4">
                <span>平台以网络化、数字化、个性化、终身化的教育体系为框架，构建人人皆学、处处能学、时时可</span>
                <span>学的终身学习服务体系，助力提升市民的文化素养和终身学习能力。</span>
            </div>




        </div>


    </div>

    <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <script>
         var swiper = new Swiper(".swiper", {
            loop: true,
            autoplay: {
                delay: 3000,
                disableOnInteraction: false,
            },
        });
        // 获取所有需要动画的元素
            const animatedSections = document.querySelectorAll('.animate-section');
            let lastVisibleIndex = -1; // 记录最后一个显示的元素索引
            
            // 检查元素是否在视口中
            function isInViewport(element) {
                const rect = element.getBoundingClientRect();
                return (
                    rect.top <= (window.innerHeight || document.documentElement.clientHeight) * 0.75 &&
                    rect.bottom >= 0
                );
            }
        // 处理滚动显示动画
            function handleScrollAnimation() {
                // 找到第一个未显示且在视口中的元素
                for (let i = lastVisibleIndex + 1; i < animatedSections.length; i++) {
                    if (isInViewport(animatedSections[i])) {
                        // 添加延迟，让动画更有层次感
                        setTimeout(() => {
                            animatedSections[i].classList.add('active');
                        }, 100);
                        lastVisibleIndex = i;
                        break; // 只显示一个，然后退出循环
                    }
                }
            }
            
            // 初始检查
            handleScrollAnimation();
            
            // 滚动时检查
            window.addEventListener('scroll', handleScrollAnimation);
        // 加载更多功能
        $(document).ready(function () {
            // 动态计算根元素字体大小（通常放在head中，优先加载）
            function setRemUnit() {
                // 设计稿宽度750px
                const designWidth = 750;
                // 1rem对应设计稿中的100px（可调整，如1rem=50px则除以50）
                const remBase = 100;
                // 获取屏幕宽度（兼容不同浏览器）
                const deviceWidth = document.documentElement.clientWidth || window.innerWidth;
                // 计算根元素font-size（屏幕宽度/设计稿宽度 * remBase）
                document.documentElement.style.fontSize = (deviceWidth / designWidth * remBase) > 100 ? 100 + 'px' : (deviceWidth / designWidth * remBase) + 'px';
                document.querySelector('.container').style.opacity = 1;
            }
            // 初始化执行
            setRemUnit();
            // 监听窗口 resize 事件，动态调整
            window.addEventListener('resize', setRemUnit);

        });
    </script>
</body>

</html>